<!-- header file with CSS and content/layout displayed on all pages -->

<%= javascript_include_tag "facebooker","append" %>
<%= stylesheet_link_tag "base","rails","form","lister","box","tabs" %>
<style type="text/css">
ul {
  padding:0px;
  margin:0px;
}

.background-top
{
  background: transparent url(<%= facebook_image_url 'TopBG.png' %>) no-repeat;
  padding-top:10px;
  padding-bottom:5px;
}

.clearfix /* tabs background color */
{
    /*background-color:#f0f0f0;*/
}

.background-mid
{
    background-color:#f0f0f0;
}

.background-bottom
{
  background: transparent url(<%= facebook_image_url 'BottomBG.png' %>) no-repeat;
}

.background-bottom A:hover {color:#ffffff;}
.background-bottom A {color:#cccccc;}

.prizes {}
.prize {
  width:47.5%;
  float:left;
  height:150px;
  margin:4px;
  overflow:hidden;
  border:1px solid #D8DFEA;
  background:#f8f8f8;
}

.prize-pic {
  float:left;
  width:53%;
  padding-left:10px;
}

.prize-desc,.prize-description {
  float:left;
  padding-top:55px;
  width:40%;
  text-align:center;
}

.prize-hover {
  background-color:#ffa;
}

.prize-selected {
  background-color:#e0ffa2;
}

.home-layout{
  text-align:left;
  width:96.3%;
  padding:10px 10px 5px;
  margin:4px 0 4px 8px;
}

.current-streak {
  background-color:#4D9FBD;
  text-align:center;
  margin:0px 0 8px 0;
}

.current-streak-num {
  font-size:50px;
  font-weight:bold;
  padding:0px;
  margin:0px;
  vertical-align:middle;
}

.current-streak .change-prize {
  text-align:center;
}

.last-streak {
  text-align:center;
  margin:0px 8px 0px 0;
  background:#BD4D67;
  font-style:italic;
  height:50px;
}

.challenge-notification {
  background:#ccc;
  margin:8px 8px 8px 0;
  padding:0px;
}

.place-bets {
  display:block;
  padding:13px 0 0;
  color:white;
  font-weight:bold;
  margin:0;
  text-align:center;
  height: 32px;
  border: 2px solid #226F14;
  background: transparent url(<%= facebook_image_url "green_header.gif" %>) repeat-x scroll 0% 0%;  
}

.place-bets-hover {
  display:block;
  padding:13px 0 0;
  color:white;
  font-weight:bold;
  margin:0;
  text-align:center;
  height: 32px;
  border: 2px solid #226F14;
  background: transparent url(<%= facebook_image_url "green_header_hover.gif" %>) repeat-x scroll 0% 0%;  
}

.reset-bets {
  display:block;
  padding:5px 0 0 0;
  margin:7px 0px 20px 0;
  text-align:center;
  color:white;
  height: 19px;
  border: 2px solid #FF8F35;
  background: transparent url(<%= facebook_image_url "orange_header.gif" %>) repeat-x scroll 0% 0%; 
}

.reset-bets-hover {
  display:block;
  padding:5px 0 0 0;
  margin:7px 0px 20px 0;
  text-align:center;
  color:white;
  height: 19px;
  border: 2px solid #FF8F35;
  background: transparent url(<%= facebook_image_url "orange_header_hover.gif" %>) repeat-x scroll 0% 0%; 
}

.buy-wins {
  display:block;
  padding:5px 0 0 0;
  margin:4px;
  text-align:center;
  color:white;
  height: 19px;
  border: 2px solid #FF8F35;
}

.team-hover {
  background-color:#C6C6C6;
}

.team-selected {
  background-color:#ffa;
}

.sport-hover {
  background-color:#C6C6C6;
}

.sport-selected {
  background-color:#ffa;
}
.bet-selected {
  background-color:#E0FFA2;  
}

.leagues {
  border:1px dotted #D8DFEA;
  margin-right: 5px;
}

table.lister table.no-lister td {
  border:0px;
  padding:0px;
  margin:0px;
}

.filter {
  margin:5px 0 0 0;
  border:1px dotted #D8DFEA;
  background: #FFF;
  width:100%;
}

.filter li {
  padding: 4px;
}

.filter td {
  padding: 4px;
}

table.lister thead tr th,
table.lister thead tr th {
  background: transparent url(<%= facebook_image_url "apple_header_3.gif" %>) repeat-x scroll 0% 0%;
}

.lister thead td {
  background: transparent url(<%= facebook_image_url "apple_header_2.gif" %>) repeat-x scroll 0% 0%;
  color:#4D4D4D;
  font-size:10px;
}

.filter .selected,
.tab td span a,
.tab li span a {
  background: transparent url(<%= facebook_image_url "button-selected.gif" %>) repeat-x scroll 0% 0%;
}

.filter li.selected a,
.filter td.selected a {
  color:#fff;
  font-weight:bold;
  padding: 2px;
}

.key {
  border:1px dotted #D8DFEA;
  padding:5px;
  margin:0px;
  background:#e6e6e6;
}

.key td {
  padding: 5px;
  font-size: 10px;
}

span.bet-spread {  font-size:11px;}

.winstreak-goal {
  padding:30px 35px;
  background: transparent url(<%= facebook_image_url "winner.png" %>) no-repeat scroll 0% 0%;
}

.boldfont {  font-weight:bold;}

.center {
  text-align: center;
}

.boardkit_frame {  
  width: 744px;
  border: 1px solid #D8DFEA;
}

.boardkit_title {
  background: transparent url(<%= facebook_image_url 'apple_header.gif' %>) repeat-x scroll 0% 0%;
  font-weight: bold;
  color: #4D4D4D;
  padding: 5px;
  font-size: 12px;
  border: none;
}

.boardkit_topic {   background: #fff; border:none; }

.boardkit_subtitle {   background: transparent url(<%= facebook_image_url 'apple_header_2.gif' %>) repeat-x scroll 0% 0%; }

.tabs {
  border:none;
  height:37px;
  background: transparent url(<%= facebook_image_url 'menu-extend.png' %>) repeat-x scroll 0% 0%; 
}

.left_tabs {
  float: left;
  padding: 0px;
}


.toggle_tabs li{
  line-height:29px;
 }


.toggle_tabs li a.selected {
  background: transparent url(<%= facebook_image_url 'button-selected.gif' %>) repeat-x scroll 0% 0%;
  border: 1px solid #141414;
} 

.toggle_tabs li a {
    background: transparent url(<%= facebook_image_url 'button-normal.gif' %>) repeat-x scroll 0% 0%;
	height: 30px;
	padding:2px 15px 3px 15px;
}

.toggle_tabs li a:hover {
  background: transparent url(<%= facebook_image_url 'button-hover.gif' %>) repeat-x scroll 0% 0%;
  color:white;
  text-decoration: none;
}
 
a.comments, a:hover.comments {
 	text-decoration:none;
}
a.comments span.show_span {
	background: url(<%= facebook_image_url '1rightarrow.png' %>)  0% 40% no-repeat;
	width:16px;
	height:40px;
	line-height:2em;
	color:#000;
	font-weight:bold;
	
} 

a.comments span.hide_span {
	background: url(<%= facebook_image_url '1downarrow.png' %>)  0% 40% no-repeat;
	width:16px;
	line-height:2em;
} 
.expander-small{
	padding-top: 5px;
	padding-bottom:5px;
}
.bottom_border{
	
	border-bottom:1px solid #D8DFEA;
	height:2px;
	padding:0px;
	margin:0px;
}

a.feedtitle{
	font-size:14pt
}

.lh{
	text-align:left;
	vertical-align:top;
	padding-top:0px;
	margin-top:0px
}
a.feedtitle{
	font-weight:bold;
	font-size:14px;
}
.team_item{
	border:1px solid #e3dede;
	float:left;
	padding:5px;
	width:160px;
	overflow:auto;
	margin-left: 60px;
	margin-right: 30px;
	color:#3B5888;
	cursor:pointer;
}
.next_section{
	text-align:right;
	margin:5px;
	cursor:pointer;
	float:right;
	color:#3B5888;
}
.achievement_logo{}
.navigation{
	text-align:left;
	color:#204178;
	line-height:22px;
}
.league_nav div, .country_nav div, .sport_nav div, .team_nav div{
	cursor:pointer;
	font-size:12px;
}
.navigation .sport_nav{
}
.navigation .country_nav{
	padding-left: 15px;
}
.league_nav {
	padding-left:30px
}
.team_nav {
	padding-left:45px
}
.navigation .selected{
	  background: transparent url(<%= facebook_image_url 'button-selected.gif' %>) repeat-x scroll 0% 0%;
	  color:#FFF;
	  overflow:auto;
	  font-weight: bold;
	  padding-left: 5px;
}
.achievement_cell{
	width:120px;
}
.menu_arrow{	
	font-weight:bold;
	cursor:pointer;
	color:#000;
	padding-left:4px; 
}
.cont{
	overflow:hidden;
}
.profile_tab  tbody td{
	border:none;
	padding:0px;
} 
</style>

<%if not current_user.hide_bookmark%>
	<div class="home-layout" style="background:#e6e6e6;width:95%;padding-bottom:5px;padding-top:5px;margin-top:0px" id='bookmark'>
		<center>
		<TABLE><TR>
			<TD><span style="padding:5px;">Bookmark 13wins <span style="font-weight:bold;">NOW</span> for easy access!</span></TD>
			<TD><fb:bookmark /></TD>
			<TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=link_to "Done!","#",:onclick=>"dismiss_ajax('" + @call_back_url + "','bookmark'," + current_user.id.to_s + ");return false;",:clicktohide=>"bookmark"%></TD>
		</TR></TABLE>
		</center>
	</div>
<%end%>
<p></p>

<div class="background-top">
	<div class="header">
		<table width="100%">
			<tr>
				<!--  <td><center>
					<fb:iframe frameborder='0' scrolling='no' marginheight='0' marginwidth='0' width='645' height='75' src='http://adparlor.com/serveIFrameAd.aspx?appId=5307783&adtype=6&adTBG=EEEEEE&adTColor=0000000&adCntColor=000000&adBG=EEEEEE' id='AdParlorAd'></fb:iframe> 
				</center></td> -->
			</tr>
		</table>

		<table width="100%">
			<tr>
				<td width="30%">
					<fb:user-agent includes="ie 6"><%= link_to(image_tag('logo.jpg',:size=>"200x65"),root_path) %></fb:user-agent> 
					<fb:user-agent excludes="ie 6"><%= link_to(image_tag('logo.png',:size=>"200x65"),root_path) %></fb:user-agent> 
				</td>
				<td width="70%">
					<%= render :partial=>"winstreaks/stat",:locals=>{:user=>current_user} %>
				</td>
			</tr>
		</table>
	</div>
</div>

<% unless params[:controller] =~ /^admin\// %>
	<% fb_tabs do %>
	<%= fb_tab_item2 :users,'Leaderboards',users_path %>	
	<%= fb_tab_item2 lambda{params[:controller] == "bets" && params[:type] == nil},'Current Bets[' + current_user.current_streak_bets_count.to_s + ']',bets_path %>
	<% Sport.all(:order=>"position asc").each do |sport| %>
	<%= fb_tab_item2 lambda{params[:controller] == "sports" && params[:id] == sport.id.to_s },sport.name,sport_path(sport,:order_by=>"most_popular") %>
	<% end %>
	<%= fb_tab_item2 :buy_wins,'Shop',buy_wins_path %>
	<%= fb_tab_item2 :earn_wins,'Earn',earn_wins_path %>
	<%= fb_tab_item2 ['winstreaks','history'],'History',history_winstreaks_path %>
	<%= fb_tab_item2 :help,'Help',"http://apps.facebook.com/thirteenwins/help" %>
<% end %>

<% else %>
	<% fb_tabs do %>
	<%= fb_tab_item2 false,'admin',admin_matches_path if current_user.admin?%>
	<%= fb_tab_item2 :admin_matches,"Matches",admin_matches_path %>
	<%= fb_tab_item2 :admin_results,"results",admin_results_path %>
	<%= fb_tab_item2 :admin_bets,"Bets",admin_bets_path %>
	<%= fb_tab_item2 :admin_teams,"Teams",admin_teams_path %>
	<%= fb_tab_item2 :admin_users,"Users",admin_users_path %>
	<%= fb_tab_item2 :admin_sports,"Sports",admin_sports_path %>
	<%= fb_tab_item2 :admin_prizes,"Prizes",admin_prizes_path %>
	<%= fb_tab_item2 :admin_countries,"Countries",admin_countries_path %>
	<%= fb_tab_item2 :admin_leagues,"Leagues",admin_leagues_path %>
	<%= fb_tab_item2 :admin_point_configs,"WinPoints",admin_point_configs_path %>
	<%= fb_tab_item2 false,'Return to App',bets_path %>
<% end %>

<% end %>



